﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<#include "common/common.html">
<title>${sysName!}</title>
</head>
<body>

<header class="navbar-wrapper">
	<div class="navbar navbar-fixed-top">
		<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:;">${sysName!}</a><a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/aboutHui.shtml">${sysName!}</a><a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>
			<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
				<ul class="cl">
					<li>${admin.type! }</li>
					<li class="dropDown dropDown_hover">
						<a href="#" class="dropDown_A">${admin.name !} <i class="Hui-iconfont">&#xe6d5;</i></a>
						<ul class="dropDown-menu menu radius box-shadow">
							<li><a href="${ctx}/signOut">退出</a></li>
							<li><a href="javascript:;" onclick="editPass()">修改密码</a></li>
					</ul>
				</li>
					<li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
						<ul class="dropDown-menu menu radius box-shadow">
							<li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
							<li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
							<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
							<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
							<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
							<li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
					</ul>
				</li>
			</ul>
		</nav>
	</div>
</div>
</header>
<#include "side.html">
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<section class="Hui-article-box">
	<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
		<div class="Hui-tabNav-wp">
			<ul id="min_title_list" class="acrossTab cl">
				<li class="active">
					<span title="我的桌面" data-href="welcome.html">我的桌面</span>
					<em></em></li>
		</ul>
	</div>
		<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
</div>
	<div id="iframe_box" class="Hui-article">
		<div class="show_iframe">
		
			<div style="display:none" class="loading"></div>
			<#include "welcome.html">
	</div>
</div>
</section>
</div>
</body>
<script type="text/javascript">

function editPass(){
  var  html =  '<form class="form-horizontal" style = "margin-top:5%;">'+
                                '<div class="row cl" style = "margin-right: 0px;">'+
				    			'<label class="form-label col-xs-3 col-sm-4"><span class="c-red">*</span>原始密码：</label>'+
				    			'<div class="formControls col-xs-5 col-sm-6">'+
				    				'<input type="password" class="input-text valid" value="" placeholder="" id="pass">'+
				    			'</div>'+
				    			'</div>'+
				    			'<div class="row cl" style = "margin-right: 0px;margin-top:5%;">'+
				    			'<label class="form-label col-xs-3 col-sm-4"><span class="c-red">*</span>新密码：</label>'+
				    			'<div class="formControls col-xs-5 col-sm-6">'+
				    				'<input type="password" class="input-text valid" value="" placeholder="" id="newPass">'+
				    			'</div>'+
				    			'</div>'+
				    			'<div class="row cl" style = "margin-right: 0px;margin-top:5%;">'+
				    			'<label class="form-label col-xs-3 col-sm-4"><span class="c-red">*</span>确认新密码：</label>'+
				    			'<div class="formControls col-xs-5 col-sm-6">'+
				    				'<input type="password" class="input-text valid" value="" placeholder="" id="repeatPass">'+
				    			'</div>'+
				    			'</div>'+
						'</form>';
				
	 layer.open({
		type: 1,
		skin: 'layui-layer-molv',
		title: "修改密码",
		area: ['550px', '270px'],
		shadeClose: false,
		content: html,
		btn: ['修改','取消'],
		btn1: function (index) {
			
			var pass = $('#pass').val(),newPass = $('#newPass').val(),repeatPass = $('#repeatPass').val();
			
			if(pass.length < 6 || newPass.length < 6 || repeatPass.length < 6 ){
				layer.alert("密码长度必需大于6位	");
				return false;
			}
			
			
			
			if(pass==""){
				layer.alert("请输入旧密码");
				return false;
			}
			if(newPass==""){
				layer.alert("请输入新密码");
				return false;
			}
			if(repeatPass==""){
				layer.alert("确认新密码");
				return false;
			}
			
			 if(newPass !=repeatPass){
				 layer.alert("确认密码与新密码不符");
				 return false;
			 }
			 
			 var data = {
					 'pass':pass,
					 'newPass':newPass,
					 'repeatPass':repeatPass
			 }
			 
			$.ajax({
				type: "POST",
			    url: basePath + "/admin/editPass",
			    data: data,
			    dataType: "json",
			    success: function(r){
					if(r.code == 0){
						layer.close(index);
						layer.alert('修改成功', function(){
							location.reload();
						});
					}else{
						layer.alert(r.msg);
					}
				}
			});  
	    }
	}); 
}

</script>
</html>